# Contributor: Thiago Perrotta <tbperrotta@gmail.com>
# Maintainer: Thiago Perrotta <tbperrotta@gmail.com>
pkgname=py3-minidb
pkgver=2.0.7
pkgrel=4
pkgdesc="Simple SQLite3 store for Python objects"
url="https://thp.io/2010/minidb"
arch="noarch"
license="ISC"
depends="python3"
makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/m/minidb/minidb-$pkgver.tar.gz"
builddir="$srcdir/minidb-$pkgver/"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
dc04d2d51fdc4ecf30e234cb25e17bf0cd5c320dfca6bdd306b61eced89fe8f1fb5df93111ec0c04f1b258ecde467203a968e61b913feee87301dec7e93d9412  minidb-2.0.7.tar.gz
"
